import request from '@/config/axios'

export const getSegmentedDevice = async (params) => {
  return await request.getJL({
    url: '/queue/transport-plan/get-segmented-device',
    params
  })
}

export const getDispatchPlanPage = async (params) => {
  return await request.getOriginalJL({
    url: '/queue/transport-plan/get-dispatch-plan-page',
    params
  })
}

export const getDispatchDetail = async (params) => {
  return await request.getJL({
    url: '/queue/transport-plan/get-dispatch-detail',
    params
  })
}

export const getOutTenantListByIdentityAndShare = async (
  params
) => {
  return await request.getDYXT({
    url: '/account-authorize/getOutTenantListByIdentityAndShare',
    params
  })
}

export const getCustomerListByIdentityAndShare = async (
  params
) => {
  return await request.getDYXT({
    url: '/account-authorize/get-customer-list-by-identity-and-share',
    params
  })
}

export const findProductByCustomerId = async (params) => {
  return await request.getJL({
    url: '/queue/sale-waybill/find-product-by-customerId',
    params
  })
}

export const createDispatchPurchaseSalePlan = async (
  data
) => {
  return await request.postJL({
    url: '/queue/dispatch-purchase-sale-plan-mgr/create',
    data
  })
}

export const disableDispatchPurchaseSalePlan = async (
  data
) => {
  return await request.putJL({
    url: '/queue/dispatch-purchase-sale-plan-mgr/disable',
    data
  })
}
